#ifndef ENGINE_KINETIC_MOVEMENT_H
#define ENGINE_KINETIC_MOVEMENT_H


#include "../Synaptic/Misc.h"

namespace Engine {

namespace Kinetic {

//Interpolates movement. Plans to add multiple destinations.
class Movement {
  private:
	Misc::Vector2d departure; // Where its coming from
	Misc::Vector2d destination; // Where its going to
	double maxSpeed; 
	double speed; 
	double acceleration; 

  public:
	Movement(const Misc::Vector2d & from, const Misc::Vector2d & to, double accel, double speed, double max); 
	Movement(); 
	virtual ~Movement(); 
	inline Misc::Vector2d readLocation(); // Reads the current location
	Misc::Vector2d update(int delta); 
	inline void setDestination(const Misc::Vector2d & newDestination); 
	inline void setDeparture(const Misc::Vector2d & newDeparture); 
	inline void setSpeed(double newSpeed); 
	inline void setMaxSpeed(double newMaxSpeed); 
	inline void setAccel(double newAcceleration); 
};
// Reads the current location
inline Misc::Vector2d Movement::readLocation() {
  	return departure;
}

inline void Movement::setDestination(const Misc::Vector2d & newDestination) {
  	this->destination = newDestination;
}

inline void Movement::setDeparture(const Misc::Vector2d & newDeparture) {
  	this->departure = newDeparture;
}

inline void Movement::setSpeed(double newSpeed) {
  	this->speed = newSpeed;
}

inline void Movement::setMaxSpeed(double newMaxSpeed) {
  	this->maxSpeed = newMaxSpeed;
}

inline void Movement::setAccel(double newAcceleration) {
  	this->acceleration = newAcceleration;
}


} // namespace Engine::Kinetic

} // namespace Engine
#endif
